package cn.jsu.oj.judgment.process;

import cn.jsu.oj.judgment.net.netHandler.InBoundHandler;
import cn.jsu.oj.judgment.net.netHandler.OutBoundHandler;
import cn.jsu.oj.judgment.process.Handle.JudgeUnixDomainHandler;
import io.netty.channel.Channel;
import io.netty.channel.ChannelInitializer;
import io.netty.channel.local.LocalChannel;
import io.netty.channel.unix.UnixChannel;


/**
 *  判题机Unix套接域读写业务逻辑链
 */
public class JudgeUnixDomainChannelInit extends ChannelInitializer<UnixChannel> {

    @Override
    protected void initChannel(UnixChannel unixChannel) throws Exception {
        unixChannel.pipeline()
                .addLast(new InBoundHandler())
                .addLast(new OutBoundHandler())
                .addLast(new JudgeUnixDomainHandler());
    }
}
